#ifndef QREMOTEOBJECT2META_P_H
#define QREMOTEOBJECT2META_P_H

#include <memory>
#include <unordered_map>

#include <QMetaObject>

#include "QRemoteObject2.h"

class QRemoteObject2Meta
{
public:


public:

    static QRemoteObject2Meta* Instance();

    //拉取远程类的元信息
    QRemoteObject2::RemoteObjectMetaDataPtr fetchRemoteClass(QString className);

    QList<int> allMethodData(QString className);
    QRemoteObject2::ROMethodMetaData findMethodData(QString className,int index);

    QList<int> allPropData(QString className);
    QRemoteObject2::ROPropertyMetaData findPropData(QString className,int index);

    bool isRegistered(QString className);

    //注册远程类的元信息
    void registerRemoteClass(QRemoteObject2::RemoteObjectMetaDataPtr meta);

private:
    QRemoteObject2Meta();
    ~QRemoteObject2Meta();
    struct Private;
    std::unique_ptr<Private> _P;
};



#endif
